//
//  MainTabViewController.m
//  CarJHQ
//
//  Created by cts on 2018/1/23.
//  Copyright © 2018年 hhjiang. All rights reserved.
//

#import "MainTabViewController.h"
#import "MainViewController.h"
#import "XiaoxiViewController.h"
#import "MyViewController.h"

@interface MainTabViewController ()

@end

@implementation MainTabViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    MainViewController *main = [[MainViewController alloc] init];
    XiaoxiViewController *wea = [[XiaoxiViewController alloc] init];
    MyViewController *zixun = [[MyViewController alloc] init];
   
    
    UINavigationController *nav1 = [[UINavigationController alloc] initWithRootViewController:main];
    UINavigationController *nav2 = [[UINavigationController alloc] initWithRootViewController:wea];
    UINavigationController *nav3 = [[UINavigationController alloc] initWithRootViewController:zixun];
    
    nav1.navigationBar.barTintColor = [UIColor whiteColor];
    nav2.navigationBar.barTintColor = [UIColor whiteColor];
    nav3.navigationBar.barTintColor = [UIColor whiteColor];
   
    self.tabBar.barTintColor = [UIColor whiteColor];
    //隐藏分割线
    self.tabBar.clipsToBounds = YES;
    self.viewControllers = @[nav1,nav2,nav3];
    NSArray *titles = @[@"订单", @"消息", @"我的"];
    NSArray *titles1 = @[@"我的-2", @"我的-2", @"我的-2"];
    NSArray *titles2 = @[@"我的", @"我的", @"我的"];
    NSInteger i=0 ;
    for (UITabBarItem *item in self.tabBar.items) {
        item.image = [[UIImage imageNamed:titles1[i]] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
        item.selectedImage = [[UIImage imageNamed:titles2[i]] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
        item.title = titles[i];
        i++;
    }
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
